#ifndef BUILDER_PATTERN_H
#define BUILDER_PATTERN_H

#include <string>
#include <list>
#include <iostream>

using namespace std;

class Packing
{
public:
    ~Packing() {}
    virtual string pack() = 0;
};

class Item
{
public:
    ~Item() {}
    virtual string name() = 0;
    virtual Packing * packing() = 0;
    virtual float price() = 0;
};

class Wrapper : public Packing
{
public:
    ~Wrapper() {}
    string pack() override;
};

class Bottle : public Packing
{
public:
    ~Bottle() {}
    string pack() override;
};

class Burger : public Item
{
public:
    ~Burger() {}
    Packing * packing() override;
};

class ColdDrink : public Item
{
public:
    ~ColdDrink() {}
    Packing * packing() override;
};

class VegBurger : public Burger
{
public:
    ~VegBurger() {}
    float price() override;
    string name() override;
};

class ChickenBurger : public Burger
{
public:
    ~ChickenBurger() {}
    float price() override;
    string name() override;
};

class Coke : public ColdDrink
{
public:
    ~Coke() {}
    float price() override;
    string name() override;
};

class Pepsi : public ColdDrink
{
public:
    ~Pepsi() {}
    float price() override;
    string name() override;
};

class Meal
{
private:
    list<Item*> *items = new list<Item*>;

public:
    ~Meal() {}
    void addItem(Item * item);
    float getCost();
    void showItems();
};

class MealBuilder
{
public:
    ~MealBuilder() {}
    Meal* prepareVegMeal();
    Meal* prepareNonVegMeal();
};

#endif // BUILDER_PATTERN_H
